package springbootyx.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import springbootyx.service.ICollectService;
import springbootyx.entity.Collect;
import springbootyx.mapper.ICollectMapper;

import java.util.List;
@Service

public class CollectService implements ICollectService {
    @Autowired
    private ICollectMapper collectMapper;

    @Override
    public List<Collect> getMyCollect(int userid) {
        return collectMapper.getMyCollect(userid);
    }

    @Override
    public void addCollect(int userid, int fid) {
        collectMapper.addCollect(userid, fid);
    }


    @Override
    public void deleteCollect(int userid, int fid) {
        collectMapper.deleteCollect(userid, fid);
    }

    @Override
    public void deleteCollectByFid(int fid) {
        collectMapper.deleteCollectByFid(fid);
    }


}
